// JS-S00198 duel 710B
#include <iostream>
#include <algorithm>
#include <queue>
using namespace std;

constexpr int N = 1e5 + 7;
int n;
priority_queue<int, vector<int>, greater<int>> monster;
queue<int> remain;

int main() {
    ios::sync_with_stdio(false);
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    cin >> n;
    for (int i = 1, x; i <= n; i++) {
        cin >> x;
        monster.emplace(x);
    }
    remain.push(monster.top()), monster.pop();
    while (!monster.empty()) {
        int cur = monster.top();
        monster.pop();
        if (cur > remain.front())
            remain.pop();
        remain.push(cur);
    }
    return cout << remain.size() << endl, 0;
}
